]> git.saurik.com Git - apple/mdnsresponder.git/blob - Documents/Attach mDNSResponder to Xcode.rtfd/TXT.rtf
mDNSResponder-878.230.2.tar.gz
[apple/mdnsresponder.git] / Documents / Attach mDNSResponder to Xcode.rtfd / TXT.rtf
1 {\rtf1\ansi\ansicpg1252\cocoartf1404\cocoasubrtf120
2 {\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset0 Menlo-Regular;}
3 {\colortbl;\red255\green255\blue255;}
4 \margl1440\margr1440\vieww25580\viewh24980\viewkind0
5 \deftab720
6 \pard\pardeftab720\partightenfactor0
7
8 \f0\fs24 \cf0 \expnd0\expndtw0\kerning0
9 Three steps to attach, and debug in Xcode, a /usr/sbin/mDNSResponder that is already running. One caveat, mDNSResponder has to be built and deployed (using step 1 and 2 below) before it can be attached to Xcode.\
10 \
11 1.) First you have to build the Xcode project with symbols included and optimizations off.\
12 \
13 a.) From Terminal shell, open mDNSResponder Xcode project from top of tree: \'a0\
14 \
15 $ open mDNSMacOSX/mDNSResponder.xcodeproj/\
16 \
17 \pard\pardeftab720\partightenfactor0
18 \cf0 You can also just double click on the project from Finder.\
19 \
20 b.) Add your diffs to mDNSResponder project.
21 \f1\fs22 \
22 \pard\pardeftab720\partightenfactor0
23
24 \f0\fs24 \cf0 \
25 c.) Set Strip Linked Product to No and compiler Optimization Level to None. Below shows changed settings.\
26 \
27 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
28 \cf0 \kerning1\expnd0\expndtw0 {{\NeXTGraphic Screen Shot 2015-09-16 at 3.36.23 PM.png \width7680 \height460
29 }¬}\
30 \
31 {{\NeXTGraphic Screen Shot 2015-09-16 at 3.46.14 PM.png \width8700 \height460
32 }¬}\expnd0\expndtw0\kerning0
33 \
34 \pard\pardeftab720\partightenfactor0
35 \cf0 \
36 d. ) Build mDNSResponder by setting the target to mDNSResponder.\
37 \
38 {{\NeXTGraphic unknown.png \width4300 \height800 \noorient
39 }¬}\
40 \
41 Then execute\'a0Command-B to build.\
42 \
43 \
44 2.) Next, deploy newly-created Xcode version.\
45 \
46 a.) Go to Terminal shell and type the following: sudo mv \
47 \
48 b.) Then drag mDNSResponder from Products list on left side panel (shown below using red arrow) to Terminal shell.\
49 \
50 \pard\pardeftab720\partightenfactor0
51 \cf0 {{\NeXTGraphic 52D711AF-4055-4867-A494-7E31552BB9E1.png \width4420 \height9700
52 }¬}\pard\pardeftab720\partightenfactor0
53 \cf0 \
54 \
55 c.) Execute command.\
56 \
57 For example:\
58 \
59 $ sudo mv\'a0/Volumes/iMac\\ HD/Users/llaier/Library/Developer/Xcode/DerivedData/mDNSResponder-fktewmdupxbxrrdlsdljyhmihboz/Build/Products/mDNSResponder\'a0/usr/sbin/mDNSResponder\
60 \
61 d.) Restart mDNSResponder by executing the following:\
62 \
63 $ sudo killall mDNSResponder\
64 \pard\pardeftab720\partightenfactor0
65
66 \f1\fs22 \cf0 \
67 \
68 \pard\pardeftab720\partightenfactor0
69
70 \f0\fs24 \cf0 3.) In Xcode, select Debug > Attach to Process > mDNSResponder.
71 \f1\fs22 \
72
73 \f0\fs24 \
74 Now set a breakpoint and try to trigger it.\
75 }